import 'package:flutter/material.dart';

import 'package:flutter_demo/widgets/groupSlotWidget.dart';
import 'package:flutter_demo/widgets/groupHeaderWidget.dart';
import 'package:flutter_demo/widgets/goodsWidget.dart';

import 'package:flutter_demo/models/goodsItem.dart';

class MNews extends StatelessWidget {
  final title;
  final List<GoodsItem> items;
  MNews({
    this.title = "新品首发",
    @required this.items,
  }) : assert(items != null);

  @override
  Widget build(BuildContext context) {
    return MGroupSlot(
      header: MGroupHeader(title),
      body: MGridGoods(items: items),
      padding: 0.0,
    );
  }
}
